package edu.cmu.ece.ds.droidchat.message;

/**
 * The client will receive this message through the fixed listening UDP port
 */
public class NeighborInfoMessage extends DroidChatMessage {
	private static final long serialVersionUID = 6216321687244083160L;
	
	private String username; // the username of the neighbor
    private String userIp;   // the ip address of the neighbor
    private int round;       // the round number that the server is responding to
    
    private byte[] bytes = null;
    private int bg = 0;
    private String nickname;

	public NeighborInfoMessage(String username, String user_ip) {
    	super(DroidChatMessage.NEIGHBOR_INFO);
    	this.username = username;
    	this.userIp = user_ip;
    }

    public String getUsername() {
        return username;
    }

    public String getUserIp() {
        return userIp;
    }

    public int getRound() {
    	return round;	
    }
	
    public void setRound(int round) {		
    	this.round = round;	
    }
    
    public byte[] getBytes() {
		return bytes;
	}

	public void setBytes(byte[] bytes) {
		this.bytes = bytes;
	}
    
	public int getBG() {
		return bg;
	}
	public void setBG(int bg) {
		this.bg = bg;
	}
	
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	
    public String toString() {
        return "NeighborInfoMessage. username=" + this.username + " userIp="
                + this.userIp + " reply to round=" + this.round;
    }
}